import { request } from '../utils/request';
const getUserList = async (params: any) => {
  return await request.get('/user/pagination', params);
};

const getUserDetail = async (id: number) => {
  return await request.get('/user/detail?id=' + id);
};

const addUser = async (params: any) => {
  return await request.post('/user/add', params);
};

const updateUser = async (params: any) => {
  return await request.post('/user/updateWithoutImage', params);
};

const deleteUser = async (id: Number) => {
  return await request.post('/user/delete', { id: id });
};

export { getUserDetail, getUserList, addUser, updateUser, deleteUser };
